Crate serde_bare[−][src]
serde_bare
An implementation of the BARE (https://baremessages.org) encoding format draft.
Mapping from the Serde data model
bool
, i8
through i64
, u8
through u64
, f32
, f64
, string
Serialize as the BARE types of the same name.
i128
, u128
Serialize as data<16>
.
char
Serializes as u32
.
byte array
Serializes as data
.
option
Serializes as optional<type>
seq
Serializes as []type
.
Sequences with unknown lengths are not representable in BARE.
map
Serializes as map[type]type
.
unit
Serializes as void
.
unit_struct
Serializes as void
.
The container name is ignored.
unit_variant
Serialized as the variant index as a uint
followed by the variant data.
The container name and variant name are ignored.
newtype_struct
Serialized the same as the contained type. The container name is ignored.
newtype_variant
Serialized as the variant index as a uint
followed by the variant data.
The container name and variant name are ignored.
tuple
Serialized as struct
.
tuple_struct
Serialized as struct
.
The container name is ignored.
tuple_variant
Serialized as the variant index as a uint
followed by the variant data.
The container name and variant name are ignored.
struct
Serialized as struct
.
struct_variant
Serialized as a uint
followed by the variant data.
The container name and variant name are ignored.
Modules
de | |
error | |
ser |
Structs
Deserializer | |
Int | |
Serializer | |
Uint |
Enums
Error |
Functions
from_reader | |
from_slice | |
to_vec | |
to_writer |
Type Definitions
Result |